{% extends "base.html" %}

{% block title %}Upload{% endblock title %}
{% block content %}
    <h2>Upload documentation</h2>
    <p class="info">
      Select an XML file containing library or resource file
      documentation. These files can be created using
      <a href="http://code.google.com/p/robotframework/wiki/LibraryDocumentationTool">libdoc.py</a>
      tool.
    </p>

    <div class="hr"><hr /></div>

    <form enctype="multipart/form-data" action="{% url 'upload' %}" method="POST">{% if lib %}
      <div class="success">
        Successfully uploaded library <a href="{% url 'version' lib.name|urlencode lib.version|urlencode %}">{{ lib.name }}</a>.
      </div>{% endif %}{{ form.file.errors }}
      <div>
        {{ form.file }}
      </div>
      <div class="form-options">
          <table>
              <tr>
                  <td><label for="id_override_name">Overwrite library name with:</label></td>
                  <td>{{ form.override_name }}</td>
              </tr>
              <tr>
                  <td><label for="id_override_version">Overwrite library version with:</label></td>
                  <td>{{ form.override_version }}</td>
              </tr>
              <tr>
                  <td><label for="id_override">Overwrite existing documentation with same name and version</label></td>
                  <td>{{ form.override }}</td>
              </tr>
          </table>
      </div>
      <p>
        <input type="submit" value="Upload" />
      </p>
    </form>
{% endblock content %}
